<template>
    <div class="mian">
        <div class="title">饿了么</div>
        <div class="topBox">
            <div class="images">
                <img src="../../assets/8.png" alt="">
            </div>
            <div class="name">
                <div class="first">夢 迴 瑭 謿 i </div>
                <div class="second">156****0163</div>
            </div>
            <div class="zhanghu">
                <div class="shezhi">账户设置</div>
            </div>
        </div>
        <div class="middle">
            <div class="second">
                <span class="one">吃货卡</span>
                <span class="two">吃货豆：</span>
                <span class="three">1461</span>
            </div>
            <div class="third">
                升级超级吃货卡,每月得无门槛红包,下单5倍返吃货豆
            </div>
        </div>
        <div class="main">
            <div class="four">常用工具</div>
            <div class="five">
                <div class="address" @click="address">
                <van-icon name="location-o" class="icon" />
                <div class="dizhi">我的地址</div>
            </div>
            <div class="address">
                <van-icon name="service-o" class="icon" />
                <div class="dizhi">我的客服</div>
            </div>
            <div class="address" @click="guanzhu">
                <van-icon name="like-o" class="icon" />
                <div class="dizhi">店铺关注</div>
            </div>
            <div class="address">
                <van-icon name="balance-o" class="icon"/>
                <div class="dizhi">评价有礼</div>
            </div>
            </div>
        </div>
    </div>
</template>

<script setup>

import { useRouter } from 'vue-router'

var $router = useRouter()   //获取路由管理对象

var address = ()=>{
    $router.push('/address')
}

var guanzhu = ()=>{
    $router.push('/collect')
}


</script>

<style scoped>
    .title{
        width: 100%;
        height: 40px;
        font-size: 24px;
        line-height: 40px;
        text-align: center;
    }
    .topBox{
        width: 100%;
        display: flex;
    }
    .images{
        width: 20%;
    }
    img{
        width: 100%;
        opacity: 0.5;
    }
    .name{
        margin-left: 20px;
    }
    .first{
        margin-top: 10px;
        font-size: 20px;
    }
    .second{
        margin-top: 15px;
        font-size: 16px;
    }
    .zhanghu{
        flex: 1;
    }
    .shezhi{
        width: 80px;
        height: 30px;
        border: 1px solid gray;
        border-radius: 15px;
        float: right;
        line-height: 30px;
        text-align: center;
        margin-top: 30px;
    }
    .middle{
        width: 100%;
        height: 100px;
        background-color: rgb(0, 145, 255);
        border-radius: 10px;
        box-sizing: border-box;
        padding: 5px 10px;
    }
    .second{
        height: 50px;
    }
    .one{
        color: white;
        font-size: 26px;
    }
    .two{
        margin-left: 20px;
        color: white;
    }
    .three{
        color: white;
        font-size: 26px;
    }
    .third{
        font-size: 14px;
        color: #ddd;
    }
    .main{
        margin-top: 10px;
        box-sizing: border-box;
        padding:10px;
    }
    .four{
        font-size: 22px;
    }
    .five{
        margin-top: 10px;
        display: flex;
        align-items: center;
        justify-content: space-around;
        text-align: center;
        font-size: 18px;
    }
    .icon{
        font-size: 18px;
    }
</style>